package com.yidu.sanrenxing.homedata.service.impl;

import com.yidu.sanrenxing.homedata.dao.ComSeriesMapper;
import com.yidu.sanrenxing.homedata.domain.ComSeries;
import com.yidu.sanrenxing.homedata.service.ComSeriesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ComSeriesServiceImpl implements ComSeriesService {
    @Autowired
    ComSeriesMapper comSeriesMapper;
    @Override
    public List<ComSeries> selectBycomserid(int comtypeid) {
        return comSeriesMapper.selectBycomserid(comtypeid);
    }

    @Override
    public List<ComSeries> selectAll() {
        return comSeriesMapper.selectAll();
    }

    @Override
    public int deleteByPrimaryKey(int comserid) {
        return comSeriesMapper.deleteByPrimaryKey(comserid);
    }

    @Override
    public int insert(ComSeries record) {
        return comSeriesMapper.insert(record);
    }

    @Override
    public int insertSelective(ComSeries record) {
        return comSeriesMapper.insertSelective(record);
    }

    @Override
    public ComSeries selectByPrimaryKey(int comserid) {
        return comSeriesMapper.selectByPrimaryKey(comserid);
    }

    @Override
    public int updateByPrimaryKeySelective(ComSeries record) {
        return comSeriesMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(ComSeries record) {
        return comSeriesMapper.updateByPrimaryKey(record);
    }

    //通过商品编号查询该商品对应系列的所有商品编号
    @Override
    public List<String> selectManyComIdBySerIdAndComId(Integer comId) {
        return comSeriesMapper.selectManyComIdBySerIdAndComId(comId);
    }

    /**
     * 通过图片组id查询图片组
     * @param imgId
     * @return
     */
    @Override
    public List<String> selectImgGroupByImgIdGroup(List imgId) {
        return comSeriesMapper.selectImgGroupByImgIdGroup(imgId);
    }

    @Override
    public List<Integer> getAllComMsg() {
        return comSeriesMapper.getAllComMsg();
    }


}
